package com.example.assignment1.server;
import java.util.Date;
import com.google.appengine.api.datastore.Key;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class PersistentThing {
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;
	
	@Persistent
	private String thing; // what to make persistent
	
	@Persistent
	private Date created_at;
	
	public PersistentThing(String t) { this.thing = t; this.created_at = new Date(); }
	
	public Key getKey() { return key; }
	
	public String getThing() { return thing;}
	
	public Date getCreatedAt() { return created_at;}
	
}
